Autogenerated HTML docs for v2.15.1-433-g936d1
diff --git a/git-worktree.html b/git-worktree.html index 7b684ca..a28ad8b 100644 --- a/git-worktree.html +++ b/git-worktree.html
@@ -748,7 +748,7 @@ <h2 id="_synopsis">SYNOPSIS</h2> <div class="sectionbody"> <div class="verseblock"> -<pre class="content"><em>git worktree add</em> [-f] [--detach] [--checkout] [--lock] [-b <new-branch>] <path> [<branch>] +<pre class="content"><em>git worktree add</em> [-f] [--detach] [--checkout] [--lock] [-b <new-branch>] <path> [<commit-ish>] <em>git worktree list</em> [--porcelain] <em>git worktree lock</em> [--reason <string>] <worktree> <em>git worktree prune</em> [-n] [-v] [--expire <expire>] @@ -787,19 +787,30 @@ <div class="sectionbody"> <div class="dlist"><dl> <dt class="hdlist1"> -add <path> [<branch>] +add <path> [<commit-ish>] </dt> <dd> <p> -Create <code><path></code> and checkout <code><branch></code> into it. The new working directory +Create <code><path></code> and checkout <code><commit-ish></code> into it. The new working directory is linked to the current repository, sharing everything except working directory specific files such as HEAD, index, etc. <code>-</code> may also be -specified as <code><branch></code>; it is synonymous with <code>@{-1}</code>. +specified as <code><commit-ish></code>; it is synonymous with <code>@{-1}</code>. </p> -<div class="paragraph"><p>If <code><branch></code> is omitted and neither <code>-b</code> nor <code>-B</code> nor <code>--detach</code> used, +<div class="paragraph"><p>If <commit-ish> is a branch name (call it <code><branch></code> and is not found, +and neither <code>-b</code> nor <code>-B</code> nor <code>--detach</code> are used, but there does +exist a tracking branch in exactly one remote (call it <code><remote></code>) +with a matching name, treat as equivalent to</p></div> +</dd> +</dl></div> +<div class="listingblock"> +<div class="content"> +<pre><code>$ git worktree add --track -b <branch> <path> <remote>/<branch></code></pre> +</div></div> +<div class="paragraph"><p>+ +If <code><commit-ish></code> is omitted and neither <code>-b</code> nor <code>-B</code> nor <code>--detach</code> used, then, as a convenience, a new branch based at HEAD is created automatically, as if <code>-b $(basename <path>)</code> was specified.</p></div> -</dd> +<div class="dlist"><dl> <dt class="hdlist1"> list </dt> @@ -854,7 +865,7 @@ </dt> <dd> <p> - By default, <code>add</code> refuses to create a new working tree when <code><branch></code> + By default, <code>add</code> refuses to create a new working tree when <code><commit-ish></code> is a branch name and is already checked out by another working tree. This option overrides that safeguard. </p> @@ -868,11 +879,11 @@ <dd> <p> With <code>add</code>, create a new branch named <code><new-branch></code> starting at - <code><branch></code>, and check out <code><new-branch></code> into the new working tree. - If <code><branch></code> is omitted, it defaults to HEAD. + <code><commit-ish></code>, and check out <code><new-branch></code> into the new working tree. + If <code><commit-ish></code> is omitted, it defaults to HEAD. By default, <code>-b</code> refuses to create a new branch if it already exists. <code>-B</code> overrides this safeguard, resetting <code><new-branch></code> to - <code><branch></code>. + <code><commit-ish></code>. </p> </dd> <dt class="hdlist1"> @@ -889,13 +900,38 @@ </dt> <dd> <p> - By default, <code>add</code> checks out <code><branch></code>, however, <code>--no-checkout</code> can + By default, <code>add</code> checks out <code><commit-ish></code>, however, <code>--no-checkout</code> can be used to suppress checkout in order to make customizations, such as configuring sparse-checkout. See "Sparse checkout" in <a href="git-read-tree.html">git-read-tree(1)</a>. </p> </dd> <dt class="hdlist1"> +--[no-]guess-remote +</dt> +<dd> +<p> + With <code>worktree add <path></code>, without <code><commit-ish></code>, instead + of creating a new branch from HEAD, if there exists a tracking + branch in exactly one remote matching the basename of `<path>, + base the new branch on the remote-tracking branch, and mark + the remote-tracking branch as "upstream" from the new branch. +</p> +<div class="paragraph"><p>This can also be set up as the default behaviour by using the +<code>worktree.guessRemote</code> config option.</p></div> +</dd> +<dt class="hdlist1"> +--[no-]track +</dt> +<dd> +<p> + When creating a new branch, if <code><commit-ish></code> is a branch, + mark it as "upstream" from the new branch. This is the + default if <code><commit-ish></code> is a remote-tracking branch. See + "--track" in <a href="git-branch.html">git-branch(1)</a> for details. +</p> +</dd> +<dt class="hdlist1"> --lock </dt> <dd> @@ -1108,7 +1144,7 @@ <div id="footnotes"><hr /></div> <div id="footer"> <div id="footer-text"> -Last updated 2017-04-27 11:19:22 JST +Last updated 2017-12-19 13:57:18 PST </div> </div> </body>